﻿using System.Collections.Generic;
using WebApplication1.classes.Core.Chrome.Bookmarks.Model;

namespace WebApplication1.classes.Core.Chrome.Bookmarks.Wrapper {
    public class Bookmarks : Bookmark {
        public Bookmarks() {
            name = "Bookmarks";
            roots = new BookmarkRoots();
            roots.setParent( this );
        }

        public string checksum { get; set; }

        public new BookmarkRoots roots { get; set; }

        public override void assignTo( ChromeBookmark item) {
            base.assignTo( item);

                var newItem = (Bookmarks) item;
                roots.assignTo( newItem.roots);
                newItem.checksum = checksum;
        }

        public override IList<Bookmark> childrenToList() {
            return new List<Bookmark> { roots };
        }

    }
}